package com.mtsmda.test;

public class InstanceOf extends ASuper{
	
	public static void main(String[] args) {
		ASuper aSuper = new InstanceOf();
		my(aSuper);
		ASuper aSuper2 = new ASuper();
		my(aSuper2);
	}
	
	private static void io(){
		
	}
	
	private static void my(ASuper aSuper){
		if(aSuper instanceof InstanceOf){
			((InstanceOf) aSuper).doBStuff();
		}else{
			System.out.println("A");
		}
	}
	
	public static void doBStuff(){
		System.out.println("B");
	}
	
}

class ASuper{
	
}